var VNCCanvasRenderer = Class.create({
	initialize: function(parent) {
		this.parent = parent;
		parent.registerEvent("dimensionsChanged",this.initCanvas,this,false);
	},	
	
	initCanvas: function(dim) {
		this.canvas = new Element("canvas",{height: dim.height, width: dim.width});
		this.parent.targetDOM.insert(this.canvas);	
		this.ctx = this.canvas.getContext("2d");
		
	},	
	
	renderImg: function(img,x,y) {
		this.ctx.drawImage(img, x, y);

	}
});
